import VueRouter from 'vue-router'

const MallView = { template: '<router-view class="view"></router-view>' }
const Mall = resolve => require(['src/pages/mall/index/Index.vue'], resolve)
const ProductDetail = resolve => require(['src/pages/mall/productDetail/ProductDetail.vue'], resolve)
const Cart = resolve => require(['src/pages/mall/cart/Cart.vue'], resolve)
const Subject = resolve => require(['src/pages/mall/subject/Subject.vue'], resolve)
const AllCategory = resolve => require(['src/pages/mall/allCategory/AllCategory.vue'], resolve)


export default{
  path: '/mall', 
  component: MallView,
  children: [{ 
    	path: '/', 
    	component: Mall 
    },{ 
    	path: 'productDetail/:id', 
      name:'productDetail',
    	component: ProductDetail 
    },{ 
    	path: 'cart', 
    	component: Cart 
    },{
      path: 'subject/:subjectId',
      name: 'subject',
      component: Subject
    },{
      path: 'allCategory',
      name: 'allCategory',
      component: AllCategory
    }]
}